package com.ditri.distrident.common.entity;

import com.ditri.distrident.common.constant.ErrorCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @Author: edxuanlen
 * @Date: 2020/8/1:21:15
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result implements Serializable {

    /**
     * 状态码
     */
    private String resultCode;

    /**
     * 状态信息
     */
    private String resultMessage;

    private static final String SUCCESS_CODE = ErrorCodeEnum.SUCCESS.getCode();

    private static final String SUCCESS_MESSAGE = ErrorCodeEnum.SUCCESS.getMessage();

    public static Result getSuccess() {
        return new Result(SUCCESS_CODE, SUCCESS_MESSAGE);
    }
}
